*Cria��o das vari�veis utilizadas na an�lise
gen Transacional =  (d1q1 + d1q2+ d1q3 + d1q4+ d1q5 + d1q6)/6
gen Transitorio = ( d2q7 + d2q8 + d2q9 + d2q10 + d2q11)/5
gen Transformacional =  (d3q12 + d3q13 + d3q14 + d3q15 + d3q16 + d3q17)/6
gen Desempenho = (des1 + des2 + des3 + des4 + des5 + des6 + des7)/7

*Teste de Alpha de Cronbach
alpha d1q1 d1q2 d1q3 d1q4 d1q5 d1q6
alpha d2q7 d2q8 d2q9 d2q10 d2q11
alpha d3q12 d3q13 d3q14 d3q15 d3q16 d3q17
alpha des1 des2 des3 des4 des5 des6 des7

*Vari�veis Dummy do tipo de staleholder
quietly tabulate stakeholder, gen(stake)

*Testes de dfit e cooks para observa��es influentes e outliers 

reg Desempenho Transacional stake2-stake3
predict r, r
predict res, rstudent
predict dfit, dfits
predict cook, cooks
swilk r
hettest
vif
estimates store Modelo1
reg Desempenho Transacional stake2-stake3 if abs(res)<3 & abs(res)>-3 & abs(dfit)<1 & abs(dfit)>-1 & abs(cook)<1 & abs(cook)>-1
estimates store Modelo1sem

reg Desempenho Transitorio stake2-stake3
predict r2, r
predict res2, rstudent
predict dfit2, dfits
predict cook2, cooks
swilk r2
hettest
vif
estimates store Modelo2
reg Desempenho Transitorio stake2-stake3 if abs(res2)<3 & abs(res2)>-3 & abs(dfit2)<1 & abs(dfit2)>-1 & abs(cook2)<1 & abs(cook2)>-1
estimates store Modelo2sem

reg Desempenho Transformacional stake2-stake3
predict r3, r
predict res3, rstudent
predict dfit3, dfits
predict cook3, cooks
swilk r3
hettest
vif
estimates store Modelo3
reg Desempenho Transformacional stake2-stake3 if abs(res3)<3 & abs(res3)>-3 & abs(dfit3)<1 & abs(dfit3)>-1 & abs(cook3)<1 & abs(cook3)>-1
estimates store Modelo3sem

* Modelos com amostra completa
esttab Modelo1 Modelo2 Modelo3 

* Modelos sem outliers e observa��es influentes
esttab Modelo1sem Modelo2sem Modelo3sem  

